/*
 * ./src/fonction_threads.h
 * Copyright (C) 2009 Lameire Alexis
 * 
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef FONCTION_THREADS_H
#define FONCTION_THREADS_H
#include <pthread.h>
#include <libircclient/libircclient.h>
#include "fonction_connection.h"
typedef struct donnee_timeout donnee_timeout;
struct donnee_timeout {
	int compteur_mot;
	char *origin;
	donnee_de_control *jeux;
	irc_session_t *session;
};
void *timeout(void *data);
/**
 * \brief timeout : attend une certaine durrée et change de compteur si néssésaire
 * \param data pointeur sur une structure donnee_timeout.
 * \return aucune
 */
void init_thread_timeout(donnee_de_control * jeux, const char *origin, irc_session_t * session);
/*
 * \brief init_thread_timeout : intialise le timeout pour trouver le mot
 * \param jeux structure avec les donnée de control du bot
 * \param origin originaire du message envoyer par libircclient
 * \param session session envoyer par libircclient
 * \return aucune
 */
#endif
